<template>
    <div>
        <h1>Vue-HTML语法：插值语法 指令</h1>
        <h1>Vue-语法：响应式数据ref +reactive</h1>
        <input type="button" value="修改num" @click="fn">
        <input type="button" value="修改str" @click="fn1">
    </div>
</template>

<script setup lang="ts">
import {ref,reactive} from 'vue'
//reacrive也是声明响应式数据 只能声明对象类型
let data=reactive({
    num:100,
    str:"好好学习"
});
const fn=()=>{
    data.num++;
}
const fn1=()=>{
    data.str="天天向上"
}
</script>

<style scoped>

</style>